<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>[%= data.title %] - 有趣</title>
[% include ../pagelets/lib.html %]
</head>
<body>
[% include ../pagelets/head.html %]
<div class="wrapper">
    <div class="content">
        <div class="mod mediainfo">
            <div class="hd">
                <div class="title">
                    <h2>[%- data.title %]</h2>
                </div>
                <details>
                    <p>这个[%- getMediaTypeText(data.mediaType) %]添加于[%- getItemCreateTime(data._id) %]</p>
                    [% if(data.source){ %]<p class="via"><span>via&nbsp;:&nbsp;</span><a href="[%- data.source %]" target="_blank">[%- data.sourceName %]</a></p>[% } %]
                </details>
            </div>
            <div class="bd">
                <article>
                    [% if(data.mediaType == 'image'){ %]
                    <div class="media image">
                        <img src="[%- data.mediaUri %]" alt="[%= data.title %]" />
                    </div>
                    [% } %]
                    [% if(data.mediaType == 'video'){ %]
                    <div class="media video">
                        <video data-type="[%- data.sourceName %]" data-src="[%- data.mediaUri %]" controls="controls" width="100%" height="435" autoplay="autoplay"></video>
                    </div>
                    [% } %]
                </article>
            </div>
        </div>
    </div>
    <div class="side">
        <div class="mod userinfo">
            <div class="bd">
                <div class="author_avatar">
                    <a href="/user/[%- data.author._id %]">
                        <img src="[%- data.author.headpic %]" alt="[%= data.author.username %]" />
                    </a>
                </div>
                <div class="author_name">
                    <a href="/user/[%- data.author._id %]">[%= data.author.username %]</a>
                </div>
            </div>
        </div>
    </div>
</div>
[% include ../pagelets/foot.html %]
<script src="//lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script>
<script src="[%- staticDomain %]/js/flash.js"></script>
</body>
</html>